home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / dialog / tabbed21 / main.frm (.txt) next >
Encoding:
Visual Basic Form  |  1994-01-02  |  13.7 KB  |  381 lines

  1. VERSION 2.00
  2. Begin Form Main 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Tabbed Dialog VBX Demo"
  5.    ClientHeight    =   4845
  6.    ClientLeft      =   1725
  7.    ClientTop       =   2955
  8.    ClientWidth     =   8700
  9.    Height          =   5250
  10.    Left            =   1665
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   4845
  13.    ScaleWidth      =   8700
  14.    Top             =   2610
  15.    Width           =   8820
  16.    Begin IFRAME IFrame1 
  17.       BackColor       =   &H00C0C0C0&
  18.       Height          =   3705
  19.       Index           =   2
  20.       Left            =   135
  21.       Top             =   930
  22.       Visible         =   0   'False
  23.       Width           =   8175
  24.       Begin Label Label19 
  25.          BackStyle       =   0  'Transparent
  26.          Caption         =   "A TabPosition Property to allow the tabs to be places along any edge of the control."
  27.          FontBold        =   0   'False
  28.          FontItalic      =   0   'False
  29.          FontName        =   "Arial"
  30.          FontSize        =   9.75
  31.          FontStrikethru  =   0   'False
  32.          FontUnderline   =   0   'False
  33.          Height          =   510
  34.          Left            =   780
  35.          TabIndex        =   19
  36.          Top             =   2130
  37.          Width           =   6015
  38.       End
  39.       Begin Label Label18 
  40.          BackStyle       =   0  'Transparent
  41.          Caption         =   "A Rows Property to enable multiple rows of tabs for a single control."
  42.          FontBold        =   0   'False
  43.          FontItalic      =   0   'False
  44.          FontName        =   "Arial"
  45.          FontSize        =   9.75
  46.          FontStrikethru  =   0   'False
  47.          FontUnderline   =   0   'False
  48.          Height          =   360
  49.          Left            =   780
  50.          TabIndex        =   20
  51.          Top             =   1635
  52.          Width           =   6150
  53.       End
  54.       Begin Label Label17 
  55.          BackStyle       =   0  'Transparent
  56.          Caption         =   "A TabHeight Property to allow the size of the tabs to be changed."
  57.          FontBold        =   0   'False
  58.          FontItalic      =   0   'False
  59.          FontName        =   "Arial"
  60.          FontSize        =   9.75
  61.          FontStrikethru  =   0   'False
  62.          FontUnderline   =   0   'False
  63.          Height          =   405
  64.          Left            =   780
  65.          TabIndex        =   18
  66.          Top             =   1110
  67.          Width           =   6075
  68.       End
  69.       Begin Label Label16 
  70.          BackStyle       =   0  'Transparent
  71.          Caption         =   "New Features in version 2.0:"
  72.          FontBold        =   0   'False
  73.          FontItalic      =   0   'False
  74.          FontName        =   "Arial"
  75.          FontSize        =   12
  76.          FontStrikethru  =   0   'False
  77.          FontUnderline   =   0   'False
  78.          Height          =   375
  79.          Left            =   150
  80.          TabIndex        =   17
  81.          Top             =   555
  82.          Width           =   8040
  83.       End
  84.       Begin Label Label15 
  85.          Alignment       =   2  'Center
  86.          BackColor       =   &H00C0C0C0&
  87.          Caption         =   "Tabbed Dialog VBX"
  88.          FontBold        =   -1  'True
  89.          FontItalic      =   0   'False
  90.          FontName        =   "MS Sans Serif"
  91.          FontSize        =   13.5
  92.          FontStrikethru  =   0   'False
  93.          FontUnderline   =   0   'False
  94.          Height          =   450
  95.          Left            =   0
  96.          TabIndex        =   16
  97.          Top             =   90
  98.          Width           =   8175
  99.       End
  100.    End
  101.    Begin IFRAME IFrame1 
  102.       BackColor       =   &H00C0C0C0&
  103.       Height          =   3675
  104.       Index           =   3
  105.       Left            =   90
  106.       Top             =   960
  107.       Visible         =   0   'False
  108.       Width           =   8310
  109.       Begin Label Label6 
  110.          BackColor       =   &H00C0C0C0&
  111.          Caption         =   "Ashton Information Services is:"
  112.          FontBold        =   -1  'True
  113.          FontItalic      =   0   'False
  114.          FontName        =   "MS Sans Serif"
  115.          FontSize        =   9.75
  116.          FontStrikethru  =   0   'False
  117.          FontUnderline   =   0   'False
  118.          Height          =   2505
  119.          Left            =   90
  120.          TabIndex        =   5
  121.          Top             =   1110
  122.          Width           =   8085
  123.       End
  124.       Begin Label Label5 
  125.          Alignment       =   2  'Center
  126.          BackColor       =   &H00C0C0C0&
  127.          Caption         =   "Copyright 
  128.  1993, Ashton Information Services"
  129.          FontBold        =   -1  'True
  130.          FontItalic      =   0   'False
  131.          FontName        =   "MS Sans Serif"
  132.          FontSize        =   9.75
  133.          FontStrikethru  =   0   'False
  134.          FontUnderline   =   0   'False
  135.          Height          =   285
  136.          Left            =   90
  137.          TabIndex        =   4
  138.          Top             =   765
  139.          Width           =   8175
  140.       End
  141.       Begin Label Label4 
  142.          Alignment       =   2  'Center
  143.          BackColor       =   &H00C0C0C0&
  144.          Caption         =   "Version 2.0"
  145.          FontBold        =   -1  'True
  146.          FontItalic      =   0   'False
  147.          FontName        =   "MS Sans Serif"
  148.          FontSize        =   9.75
  149.          FontStrikethru  =   0   'False
  150.          FontUnderline   =   0   'False
  151.          Height          =   315
  152.          Left            =   45
  153.          TabIndex        =   3
  154.          Top             =   495
  155.          Width           =   8220
  156.       End
  157.       Begin Label Label3 
  158.          Alignment       =   2  'Center
  159.          BackColor       =   &H00C0C0C0&
  160.          Caption         =   "Tabbed Dialog VBX"
  161.          FontBold        =   -1  'True
  162.          FontItalic      =   0   'False
  163.          FontName        =   "MS Sans Serif"
  164.          FontSize        =   13.5
  165.          FontStrikethru  =   0   'False
  166.          FontUnderline   =   0   'False
  167.          Height          =   450
  168.          Left            =   30
  169.          TabIndex        =   2
  170.          Top             =   45
  171.          Width           =   8175
  172.       End
  173.    End
  174.    Begin IFRAME IFrame1 
  175.       BackColor       =   &H00C0C0C0&
  176.       Height          =   3675
  177.       Index           =   1
  178.       Left            =   105
  179.       Top             =   975
  180.       Visible         =   0   'False
  181.       Width           =   8310
  182.       Begin ComboBox Combo2 
  183.          Height          =   300
  184.          Left            =   2310
  185.          Sorted          =   -1  'True
  186.          Style           =   2  'Dropdown List
  187.          TabIndex        =   11
  188.          Top             =   1950
  189.          Width           =   3000
  190.       End
  191.       Begin ComboBox Combo1 
  192.          Height          =   300
  193.          Left            =   2310
  194.          Sorted          =   -1  'True
  195.          Style           =   2  'Dropdown List
  196.          TabIndex        =   7
  197.          Top             =   570
  198.          Width           =   3000
  199.       End
  200.       Begin Label Label12 
  201.          BorderStyle     =   1  'Fixed Single
  202.          Caption         =   "Label12"
  203.          Height          =   810
  204.          Left            =   2310
  205.          TabIndex        =   13
  206.          Top             =   2295
  207.          Width           =   5000
  208.       End
  209.       Begin Label Label11 
  210.          BackColor       =   &H00C0C0C0&
  211.          Caption         =   "Description:"
  212.          Height          =   285
  213.          Left            =   90
  214.          TabIndex        =   12
  215.          Top             =   2325
  216.          Width           =   2100
  217.       End
  218.       Begin Label Label10 
  219.          BackColor       =   &H00C0C0C0&
  220.          Caption         =   "Non-Standard Events:"
  221.          Height          =   255
  222.          Left            =   90
  223.          TabIndex        =   10
  224.          Top             =   2010
  225.          Width           =   2115
  226.       End
  227.       Begin Label Label9 
  228.          BorderStyle     =   1  'Fixed Single
  229.          Caption         =   "Label9"
  230.          Height          =   885
  231.          Left            =   2310
  232.          TabIndex        =   9
  233.          Top             =   930
  234.          Width           =   5000
  235.       End
  236.       Begin Label Label8 
  237.          BackColor       =   &H00C0C0C0&
  238.          Caption         =   "Description:"
  239.          Height          =   255
  240.          Left            =   75
  241.          TabIndex        =   8
  242.          Top             =   975
  243.          Width           =   2145
  244.       End
  245.       Begin Label Label7 
  246.          BackColor       =   &H00C0C0C0&
  247.          Caption         =   "Non-Standard Properties:"
  248.          Height          =   240
  249.          Left            =   45
  250.          TabIndex        =   1
  251.          Top             =   600
  252.          Width           =   2265
  253.       End
  254.       Begin Label Label2 
  255.          Alignment       =   2  'Center
  256.          BackColor       =   &H00C0C0C0&
  257.          Caption         =   "Properties and Events"
  258.          FontBold        =   -1  'True
  259.          FontItalic      =   0   'False
  260.          FontName        =   "MS Sans Serif"
  261.          FontSize        =   13.5
  262.          FontStrikethru  =   0   'False
  263.          FontUnderline   =   0   'False
  264.          Height          =   390
  265.          Left            =   45
  266.          TabIndex        =   6
  267.          Top             =   75
  268.          Width           =   8205
  269.       End
  270.    End
  271.    Begin IFRAME IFrame1 
  272.       BackColor       =   &H00C0C0C0&
  273.       Height          =   3720
  274.       Index           =   0
  275.       Left            =   105
  276.       Top             =   945
  277.       Visible         =   0   'False
  278.       Width           =   8355
  279.       Begin Label Label14 
  280.          BackColor       =   &H00C0C0C0&
  281.          Caption         =   "Ashton Information Services"
  282.          Height          =   1290
  283.          Left            =   2655
  284.          TabIndex        =   15
  285.          Top             =   1335
  286.          Width           =   4830
  287.       End
  288.       Begin Label Label13 
  289.          BackColor       =   &H00C0C0C0&
  290.          Caption         =   "This version of the Tabbed Dialog VBX (TABBED.VBX) is shareware. It can be registered by sending 
  291. 23.50 (
  292. 20.00 + VAT), or US$35 to:"
  293.          Height          =   675
  294.          Left            =   105
  295.          TabIndex        =   14
  296.          Top             =   615
  297.          Width           =   8100
  298.       End
  299.       Begin Label Label1 
  300.          Alignment       =   2  'Center
  301.          BackColor       =   &H00C0C0C0&
  302.          Caption         =   "Tabbed Dialog VBX"
  303.          FontBold        =   -1  'True
  304.          FontItalic      =   0   'False
  305.          FontName        =   "MS Sans Serif"
  306.          FontSize        =   13.5
  307.          FontStrikethru  =   0   'False
  308.          FontUnderline   =   0   'False
  309.          Height          =   450
  310.          Left            =   45
  311.          TabIndex        =   0
  312.          Top             =   210
  313.          Width           =   8175
  314.       End
  315.    End
  316.    Begin TABBED Tabbed1 
  317.       ActiveTab       =   0
  318.       Captions        =   "&Registration,&Properties/Events,&New Features,&About"
  319.       FontItalic      =   0   'False
  320.       FontName        =   "MS Sans Serif"
  321.       FontSize        =   9.75
  322.       FontStrikethru  =   0   'False
  323.       FontUnderline   =   0   'False
  324.       Height          =   4785
  325.       Left            =   30
  326.       NumberOfTabs    =   4
  327.       Rows            =   2
  328.       TabHeight       =   360
  329.       TabPosition     =   0  'Top
  330.       Top             =   45
  331.       Width           =   8610
  332.    End
  333. Option Explicit
  334. Sub Combo1_Click ()
  335.     Select Case Combo1.ListIndex
  336.     Case 0
  337.         Label9.Caption = "ActiveTab indicated the tab which is currently active. ActiveTab is an integer in the range 0..NumberOfTabs-1"
  338.     Case 1
  339.         Label9.Caption = "Captions is a comma separated list of the captions to be used for the tabs. For example, this control has a Captions property of """ + Tabbed1.Captions + """"
  340.     Case 2
  341.         Label9.Caption = "NumberOfTabs is an integer giving the number of tabs present in the control."
  342.     Case 3
  343.         Label9.Caption = "Rows is an integer which indicates the number of rows to be used to display the tabs."
  344.     Case 4
  345.         Label9.Caption = "TabHeight is an integer which gives the height of the tabs in twips."
  346.     Case 5
  347.         Label9.Caption = "TabPosition is an enumerated property that allows the tabs to be positioned along any edge of the control."
  348.     Case Else
  349.         Label9.Caption = "Error"
  350.     End Select
  351. End Sub
  352. Sub Combo2_Click ()
  353.     If Combo2.ListIndex = 0 Then
  354.         Label12.Caption = "The TabChange event is executed whenever the user clicks on a tab other than the currently active tab. The single argument is the new value of ActiveTab."
  355.     End If
  356. End Sub
  357. Sub Form_Load ()
  358.     IFrame1(Tabbed1.ActiveTab).Visible = True
  359.     Label6.Caption = "Ashton Information Services is:" + Chr$(13) + Chr$(13) + "Peter Ashton" + Chr$(13) + "28, Dragon View" + Chr$(13) + "Harrogate" + Chr$(13) + "North Yorkshire" + Chr$(13) + "HG1 4DG" + Chr$(13) + "U.K." + Chr$(13) + Chr$(13) + "E-mail: petera@cix.compulink.co.uk"
  360.     Label14.Caption = "Ashton Information Services" + Chr$(13) + "28, Dragon View" + Chr$(13) + "Harrogate" + Chr$(13) + "North Yorkshire" + Chr$(13) + "HG1 4DG" + Chr$(13) + "U.K."
  361.     Combo1.AddItem "NumberOfTabs"
  362.     Combo1.AddItem "Captions"
  363.     Combo1.AddItem "ActiveTab"
  364.     Combo1.AddItem "Rows"
  365.     Combo1.AddItem "TabHeight"
  366.     Combo1.AddItem "TabPosition"
  367.     Combo1.ListIndex = 0
  368.     Combo2.AddItem "TabChange"
  369.     Combo2.ListIndex = 0
  370. End Sub
  371. Sub Tabbed1_TabChange (ActiveTab As Integer)
  372. Dim i As Integer
  373.     For i = 0 To Tabbed1.NumberOfTabs - 1
  374.         If i = ActiveTab Then
  375.             IFrame1(i).Visible = True
  376.         Else
  377.             IFrame1(i).Visible = False
  378.         End If
  379.     Next
  380. End Sub
  381.